Sets the runtime license for LEADTOOLS and unlocks support for optional features such as LEADTOOLS Imaging Pro, Document, and Medical capabilities. After you have obtained a runtime license and a developer key, you can call Leadtools.RasterSupport.SetLicense in your application to disable the nag message.
public static void SetLicense(
byte[] licenseBuffer,
string developerKey
)
Public Overloads Shared Sub SetLicense( _
ByVal licenseBuffer() As Byte, _
ByVal developerKey As String _
)
+ (BOOL)setLicenseData:(NSData *)licenseData
developerKey:(NSString *)developerKey
error:(NSError **)error
public:
static void SetLicense(
array<byte>^ licenseBuffer,
String^ developerKey
)
licenseBuffer
Byte array containing the LEADTOOLS runtime license to set.
developerKey
Character string containing the developer key.
You must use this method to set the runtime license for LEADTOOLS and to unlock support for any optional features that you have licensed. If you do not set a RELEASE runtime license, your application will display a nag message dialog at runtime, indicating that you have developed the application without a valid runtime license.
In order to obtain a runtime license and developer key, you must contact LEAD. For more information, refer to About LEADTOOLS Runtime Licenses.
For information about LEADTOOLS Document/Medical capabilities, contact LEAD.
To determine if support for optional features has been unlocked, use IsLocked.
NOTE: As an alternative to calling RasterSupport.SetLicense, you can specify your runtime license in the Leadtools.dll.config file. For more information, see LEADTOOLS Config License.
To set the runtime license from a disk file instead of memory buffer, use SetLicense(string licenseFile, string developerKey).
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing;
public void SetLicenseByteArrayExample()
{
byte[] license = System.IO.File.ReadAllBytes(MY_LICENSE_FILE);
RasterSupport.SetLicense(license, MY_DEVELOPER_KEY);
bool isLocked = RasterSupport.IsLocked(RasterSupportType.Document);
if (isLocked)
Console.WriteLine("Document support is locked");
else
Console.WriteLine("Document support is unlocked");
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing
Public Sub SetLicenseByteArrayExample()
Dim license() As Byte = System.IO.File.ReadAllBytes(MY_LICENSE_FILE)
RasterSupport.SetLicense(license, MY_DEVELOPER_KEY)
Dim isLocked As Boolean = RasterSupport.IsLocked(RasterSupportType.Document)
If (isLocked) Then
Console.WriteLine("Document support is locked")
Else
Console.WriteLine("Document support is unlocked")
End If
End Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document